package com.jxzn.locust.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jxzn.locust.dao.AbstractRepository;
import com.jxzn.locust.dao.ResourceRepository;
import com.jxzn.locust.model.SysResource;
import com.jxzn.locust.service.ResourceService;

@Service
public class ResourceServiceImpl implements ResourceService {

    @Autowired
    ResourceRepository resourceRepository;

    @Override
    public AbstractRepository<SysResource> getRepository() {
        return resourceRepository;
    }

    @Override
    public List<SysResource> findByRoleId(int roleId) {
        return resourceRepository.findByRoleId(roleId);
    }

}
